Skip to content

refactor: move status validation to sequential service#6163

Merged
vitormattos merged 3 commits intomainfrom
refactor/move-status-validation-to-sequential-service
Dec 12, 2025
Merged

refactor: move status validation to sequential service#6163
vitormattos merged 3 commits intomainfrom
refactor/move-status-validation-to-sequential-service

Conversation

@vitormattos
Copy link
Copy Markdown
Member

No description provided.

Move status-related validation logic to SequentialSigningService where
it belongs, improving code cohesion and testability.

Changes:
- Add hasPendingLowerOrderSigners() method to check for incomplete
  lower-order signers
- Add isStatusUpgrade() method to validate status transitions
- Add validateStatusByOrder() method to encapsulate ordering
  validation logic for status transitions

These methods are now public and easily testable, centralizing all
sequential signing validation logic in a single specialized service.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Remove internal validation methods from RequestSignatureService and
delegate to SequentialSigningService for better separation of concerns.

Changes:
- Remove hasPendingLowerOrderSigners() private method
- Remove isStatusUpgrade() private method
- Replace inline ordering validation with call to
  validateStatusByOrder()
- Simplify determineInitialStatus() by delegating validation logic

This reduces complexity in RequestSignatureService and makes the code
more maintainable by following single responsibility principle. All
sequential signing logic is now centralized in the specialized service.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos vitormattos added this to the Next Major (33) milestone Dec 12, 2025
@vitormattos vitormattos self-assigned this Dec 12, 2025
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Dec 12, 2025
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable32

@vitormattos
Copy link
Copy Markdown
Member Author

/backport to stable31

@vitormattos vitormattos merged commit b2044c6 into main Dec 12, 2025
65 checks passed
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Dec 12, 2025
@vitormattos vitormattos deleted the refactor/move-status-validation-to-sequential-service branch December 12, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant